#pragma once
#include <iostream>
#include <vector>
#include <iomanip>
const int total = 200;
const int beginAddress = 20;
class pcb
{
public:
	pcb(std::string name, int size)
		:_name(name),
		_size(size)
	{

	}
	int size()
	{
		return _size;
	}
	std::string name()
	{
		return _name;
	}
private:
	std::string _name;
	int _size;
};

class block
{
public:
	block(int address, int size)
		:_addr(address)
		,_size(size)
		,_be_ordered(false)
		,_p(nullptr)
	{

	}
	bool& is_ordered()
	{
		return _be_ordered;
	}
	int size()
	{
		return _size;
	}
	int& setsize()
	{
		return _size;
	}
	int& address()
	{
		return _addr;
	}
	pcb*& process()
	{
		return _p;
	}
private:
	int _addr;
	int _size;
	bool _be_ordered;
	pcb* _p;
};

void menu();
void fastfit(std::vector<block>& v, pcb p);
void freepcb(std::vector<block>& v, int x);
void show(std::vector<block>& v);